const fs = require("fs");
const path = require("path");
const https = require("https");
const app = require("./app");
require("./app/database");

const options = {
  key: fs.readFileSync(path.join(__dirname, "./5683058_lianghj.top.key")),
  cert: fs.readFileSync(path.join(__dirname, "./5683058_lianghj.top.pem")),
};
// 创建https 服务
var httpsServer = https.createServer(options, app.callback());
httpsServer.listen(8000);
